1. Field of the Invention
The present invention relates to a fuzzy computer, and more in particular, to a fuzzy computer which is capable of computing a membership function necessary for fuzzy operation at higher speed with less hardware.
2. Description of Related Art
When fuzzy operation is executed, it is necessary to compute a function f(x), which is called a membership function, for an input x so that the input x can be converted into the data capable of being fuzzily operated as described in Toshio Terano et al., "A Guide to Fuzzy System" (Ohm Book Company, Inc., 1987), pp. 150 through 152.
The membership function f(x) is in general of a bell-shape, triangle, or trapezoid, and it is customary to adopt the membership function of either the triangle or trapezoid so that the fuzzy operation could readily be carried out.
In digital operation, the membership function f(x) is defined with integer values f.sub.0, f.sub.1, f.sub.2 . . . f.sub.n-1, f.sub.n which are corresponding to discrete values x (x=0, 1, 2 . . . n-1, n). Accordingly, conventionally when the membership function f(x) is obtained by a computer, it is necessary that the integer values should be stored on a memory in advance as shown in FIG. 1, and then the value of the function f(x) should be read by making the input x as an index, or the value of the function f(x) should directly be computed by software.
Where such a membership function as shown in FIG. 2 is computed by, for example, a microprocessor 8088 manufactured by Intel Co., it is necessary to execute a program such as shown in FIG. 3.
Now will be described bellow the program shown in FIG. 3.
This program designates the process that a value of the function f(x) is obtained from the input x being stored in a cx register and then is stored in an ax register.
In the first and seventh lines, there are instructions to prepare their respective constants in a dx register.
There are instructions to set a value of the function f(x) to "0" in advance in the second line and to set a value of the function f(x) to "255" in advance in the tenth line, respectively.
And first it is checked in the third line whether the input x is within the area of p shown in FIG. 2 or not, and when the input x is within the area of p, the function f(x) is made to be as f(x)="0" in the fourth line, finishing the program.
Then, it is checked in the fifth line whether the input x is within the area of q shown in FIG. 2, or not, and when the input x is within the area of q, the program is branched in the sixth line to the thirteenth line in order to compute a straight line A.
Next, it is checked in the eighth line whether the input x is within the area of t shown in FIG. 2 or not, and when the input x is within the area of t, the function f(x) is made to be as f(x)="0" in the ninth line, finishing the program.
And it is checked in the eleventh line whether the input x is within the area of r shown in FIG. 2 or not, and when the input x is within the area of r, the function (x) is made to be as f(x)="255" in the twelfth line, finishing the program.
As can be seen from the above description, processings in the thirteenth line through eighteenth line are to be carried out when the input x is within the area of q in FIG. 2 (where the value of dx register is "32") or the area of s (where the value of dx register is "192").
In those processings, the program is finished after the straight line A or B was computed. The thirteenth line designates an instruction to subtract the input x from the value of the dx register. And when the results of this instruction show that the subtracted value is negative, the input x is within the area of q, and then, the value is inverted to be positive in the fourteenth line and fifteenth line.
The sixteenth line and seventeenth line designate instructions to quadruplicate the subtraction results, and the eighteenth line designates an instruction to move the subtraction results in the ax register.
The conventional fuzzy computer has generated the membership function according to the above process steps, and then, when there is adopted the method of reading the membership function from the memory according to the index value, there exists inconvenience that it is necessary to equip a mass-storage memory for storing the membership function, and when there is adopted the method of calculating the membership function by using softwares, there exists inconvenience that it takes longer time to compute the membership function.